<extend name="Public:Base" />
<block name="title">
    <title>美住 - 客栈申请</title>
</block>
<block name="extendHead">
    <link rel="stylesheet" href="__PUBLIC__/src/meizhu/HotelApply/index.css"/>
</block>
<block name="document">
    <div id="doc" data-side-menu-id="sideMenuApply" data-side-menu-toggle-id="collapseHotelToggle">
        <div id="doc-header">
            <include file="Public:Include_navbar" />
        </div>
        <div id="doc-center">
            <div class="container">
                <div class="col-xs-3-15">
                    <include file="Public:Include_sideMenu" />
                </div>
                <div class="col-xs-12-15">
                    <nav class="navbar navbar-default navbar-custom-fitin">
                        <div class="container-fluid">
                            <p class="navbar-text custom-navber-text">客栈申请列表</p>
                        </div>
                    </nav>
                    <nav class="navbar navbar-default navbar-custom-fitin nav-padding">
                        <div class="container-fluid">
                            <div class="collapse navbar-collapse">
                                <form id="searchForm" action="" method="post" >
                                    <div class="form-group">
                                        <!--  <label class="col-xs-1 control-label">客栈名称</label> -->
                                        <div class="col-xs-3">
                                            <input type="text" value="{$condition.k}" class="form2-control col-xs-6"  placeholder="客栈名称、手机号"  name="k"  />
                                        </div>
                                        <div class="col-xs-2">
                                            <input href="javascript:void(0);" class="btn btn-default btn-sm  glyphicon glyphicon-search"  value='查找' type='submit' ></input>
                                        </div>
                                        {: echoSearch()}
                                    </div>
                                </form>
                            </div>
                        </div>
                    </nav> 
                    <div class="well well-custom-has-navbar">
                        <div class="well-custom-body">
                            <div class="table-responsive">
                                <table class="table table-bordered table-hover" id="questionTalbe">
                                    <thead>
                                        <tr>
                                            <th>客栈名称</th>
                                            <th class="col-xs-2">所在城市</th>
                                            <th>区号</th>
                                            <th>联系方式</th>
                                            <th>申请人</th>
                                            <th>申请时间</th>
                                            <th>申请状态</th>
                                            <th class="col-xs-3">操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <foreach name="applyData" item="vo">
                                        <tr>
                                            <td>{$vo.hotelname}</td>
                                            <td>{$vo.cityname}</td>
                                            <td>{$vo.areacode}</td>
                                            <td>{$vo.mobile}</td>
                                            <td>{$vo.username}</td>
                                            <td>{$vo.createtime|substr=0,10}</td>
                                            <td>{:getApplyStatus($vo['status'])}</td>
                                            <td>
                                        <if condition="$vo['status'] eq 0">
                                            <button class="btn btn-default  btn-sm edit" data-toggle="modal" data-json='{:json_encode($vo);}' data-target="#editModel">开通</button>
                                            <button class="btn btn-success  btn-sm shiyong" data-toggle="modal" data-json='{:json_encode($vo);}' data-target="#editModel">试用</button>
                                            <button class="btn btn-success  btn-sm test" data-toggle="modal" data-json='{:json_encode($vo);}' data-target="#editModel">测试</button>
                                            <button class="btn btn-danger  btn-sm confuse" data-toggle="modal" data-json='{:json_encode($vo);}' data-target="#statusModel">拒绝</button>
                                            <elseif condition="$vo['status'] eq 2" />
                                            <button class="btn btn-default  btn-sm edit" data-toggle="modal" data-json='{:json_encode($vo);}' data-target="#editModel">开通</button>
                                        </if>

                                        </td>
                                        </tr>
                                    </foreach>
                                    <tr class="padtopx"><td colspan="6">{$page}</td></tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>

        <div id="doc-footer">
            <include file="Public:Include_footer" />
        </div>
    </div>
    <div class="modal fade" id="editModel">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">客栈申请审核</h4>
                </div>
                <div class="modal-body">
                    <div class="form-container">
                        <div class="custom-form-body">
                            <form class="form-horizontal">
                                <div class="form-group">
                                    <label for="requestEditHotel" class="col-xs-3 control-label"><span style="color:red">*</span>客栈名称：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestEditHotel">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestEditAccount" class="col-xs-3 control-label"><span style="color:red">*</span>客栈时区</label>
                                    <div class="col-xs-6">
                                        <select class="form-control" id="addHotelRequestUniversalTime" disabled="disabled">
                                            <volist name="universalTimeList" id="universalTime">
                                                <option value="{$universalTime.universalTimeId}"  data-areacode="{$universalTime.areaCode}">({$universalTime.universalTimeUtc}){$universalTime.universalTimeName}</option>
                                            </volist>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestEditCurrency" class="col-xs-3 control-label"><span style="color:red">*</span>多元币种</label>
                                    <div class="col-xs-6">
                                        <select class="form-control" id="addHotelRequestCurrency" disabled="disabled">
                                           <volist name="currencyInfo" id="currency">
                                                <option value="{$currency.id}"">({$currency.standsymbol}) {$currency.name} . {$currency.symbol}</option>
                                            </volist>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestEditCity" class="col-xs-3 control-label"><span style="color:red">*</span>所在城市：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestEditCity" style="cursor: pointer;"  readonly="readonly">
                                        <input type="hidden"  id="requestEditCityId"  value=""   />
                                        <div id="provinceList"  class="com_suggest" style="display:none;">
                                            <!-- 获取所有省份 -->
                                            <ul>
                                                <li>请选择所在城市: <a  class="closeCity" style="float: right;" href="javascript:void(0)">关闭</a></li>
                                                <li   class="province">
                                                    <foreach name="provinces"  item="vo">
                                                        <a href="javascript:void(0);"  data-provinceId ="{$vo.id}">{$vo.name}</a>
                                                    </foreach>
                                                </li>
                                                <li  id="cityList"   class="citys " style="display:none;">

                                                </li>

                                            </ul>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestEditDistrict" class="col-xs-3 control-label"><span style="color:red">*</span>所属区域：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestEditDistrict"  style="cursor: pointer;"  readonly="readonly">
                                        <input type="hidden" id="requestEditDistrictId"  value=""   />
                                        <div id="areaListDiv" class="com_suggest"  style="display: none;">
                                            <!-- 获取所有省份 -->
                                            <ul>
                                                <li>请选择所在区域: <a  class="closeDistrict" style="float: right;" href="javascript:void(0)">关闭</a></li>
                                                <li  id="areaList">

                                                </li>
                                            </ul>
                                        </div>

                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestEditAreacode" class="col-xs-3 control-label"><span style="color:red">*</span>区号：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestEditAreacode">
                                        <input type="hidden" id="requestEditUniversalTime">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestEditAccount" class="col-xs-3 control-label"><span style="color:red">*</span>主账号：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestEditAccount">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="requestEditUserName" class="col-xs-3 control-label"><span style="color:red">*</span>主账号名称：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestEditUserName">
                                    </div>
                                </div>                                
                                <div class="form-group" id="kaitongDate">
                                    <label for="requestKaitongDate" class="col-xs-3 control-label"><span style="color:red">*</span>开通年限：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestKaitongDate" value="1" placeholder="默认1年">
                                    </div>
                                </div>
                                <div class="form-group" id="shiyongDate">
                                    <label for="requestShiyongDate" class="col-xs-3 control-label"><span style="color:red">*</span>试用天数：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestShiyongDate" value="7" placeholder="默认7天">
                                    </div>
                                </div>
                                <div class="form-group" id="testDate">
                                    <label for="requestTestDate" class="col-xs-3 control-label"><span style="color:red">*</span>测试年限：</label>
                                    <div class="col-xs-6">
                                        <input type="text" class="form-control" id="requestTestDate" value="1" placeholder="默认1年">
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden"  id="requestId" value="" />
                    <button type="button" class="btn btn-default" id="requestCannel" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary"  data-value="" id="requestEdit">确认开通</button>
                    <button type="button" class="btn btn-success" data-value="" id="requestShiyong">确认试用</button>
                    <button type="button" class="btn btn-success" data-value="" id="requestTest">确认测试</button>
                </div>
            </div>
        </div>
    </div>


    <div class="modal fade" id="statusModel">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" id="requestCannel" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title">确定状态</h4>
                </div>
                <div class="modal-body">
                    <h3>您确定要<span class="text-danger">将你选择的客栈更改为拒绝？</span></h3>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-danger" data-value="" id="requestConfuse">确定</button>
                </div>
            </div>
        </div>
    </div>

    <!--end of doc-->
</block>

<block name="extendFootJs">
    <script type="text/javascript" src="__PUBLIC__/src/meizhu/common.js"></script>    
    <script type="text/javascript" src="__PUBLIC__/uclbrt/js/jquery-plugin/tooltip.js"></script>
    <script type="text/javascript" src="__PUBLIC__/src/meizhu/HotelApply/index.js?117"></script>
</block>

